<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="java.util.*"%>

<html:html locale="true">
<head>
<title>index page</title>
<html:base />
<style type="text/css">
A:active {
	COLOR: green;
	TEXT-DECORATION: none
}

A:hover {
	COLOR: red;
	TEXT-DECORATION: none;
	font-weight: none
}
</style>
<script type="text/javascript">
	function validate(formObj) {
		formObj.updateAction.value = "update";
		return true;
	}
</script>
</head>

<body>
	<%@ include file="../top.jsp"%>
	<c:set var="total" value="${0}" />
	<table align="center" width="100%">
		<tr>
			<td valign="top" align="center">
				<table width="100%" border="0" cellpadding="0" cellspacing="1"
					bgcolor="#6699CC">
					<tr bgcolor="white">
						<td align="center" width="75%"><br> <html:form
								method="post" action="/Client/Checkout"
								onsubmit="return validate(this)">
								<html:hidden property="action" />
								<html:hidden property="updateAction" />
								<table bgcolor="#6699CC" border="0" cellpadding="2"
									cellspacing="1" align="center" width="70%">
									<tbody>
										<tr bgcolor="#6699CC">
											<td align="center" colspan="2"><b><font
													color="white">Checkout</font></b></td>
										</tr>
										<tr bgcolor="#ffffff">
											<td colspan="2"><br> <font color="red">Payment
													details</font>
												<hr color="#6699CC"></td>
										</tr>

										<tr bgcolor="#ffffff">
											<td colspan="2">
												<table cellSpacing="1" cellPadding="5" width="100%">
													<tbody>
														<tr bgcolor="#E1E1E1">
															<td width="15%"><b>Quantity</b></td>
															<td width="65%"><b>Title</b></td>
														</tr>
														<c:forEach var="result" items="${cartItems}">
															<tr>
																<td><c:out value="${result.qty}" /></td>

																<td><c:out value="${result.itemName}" /></td>
															</tr>
														</c:forEach>
													</tbody>
												</table>
											</td>
										</tr>
										<tr bgcolor="#ffffff">
											<td colspan="2"><br> <font color="red">Personal
													information</font>
												<hr color="#6699CC"></td>
										</tr>
										<tr bgcolor="#ffffff">
											<td><b> </font>Name:
											</b></td>
											<td><font color="#FF0000"><c:out
														value="${account.getName()}" /></font></td>
										</tr>
										<tr bgcolor="#ffffff">
											<td><b> </font>Bill Address:
											</b></td>
											<td><font color="#FF0000"><c:out
														value="${account.getBilladd()}" /></font></td>
										</tr>
										<tr>
											<td><html:submit>Place Order</html:submit></td>
										</tr>
									</tbody>
								</table>
							</html:form>							
							</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html:html>